{{ header }}
<div class="site-breadcrumb">
  <div class="container">
    <ul class="breadcrumb">
      {% for breadcrumb in breadcrumbs %}
      <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
      {% endfor %}
    </ul>
  </div>
</div>
<div class="page-main user-center">
  <div class="container">
    <div class="row">
      {{ column_left }}
      {% if column_left and column_right %}
      {% set class = 'col-sm-6' %}
      {% elseif column_left or column_right %}
      {% set class = 'col-sm-9' %}
      {% else %}
      {% set class = 'col-sm-12' %}
      {% endif %}
      <div id="content" class="{{ class }}">
        {% if error_warning %}
        <div class="alert alert-danger alert-dismissible"><i class="icon-warning"></i> {{ error_warning }}</div>
        {% endif %}
        {{ content_top }}
        <h1 class="heading">{{ heading_title }}</h1>
        <p>{{ text_description }}</p>
        <form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
          <fieldset>
            <legend>{{ text_order }}</legend>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-fullname">{{ entry_fullname }}</label>
              <div class="col-sm-10">
                <input type="text" name="fullname" value="{{ fullname }}" placeholder="{{ entry_fullname }}" id="input-fullname" class="form-control" />
                {% if error_fullname %}
                <div class="text-danger">{{ error_fullname }}</div>
                {% endif %} </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
              <div class="col-sm-10">
                <input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
                {% if error_email %}
                <div class="text-danger">{{ error_email }}</div>
                {% endif %} </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
              <div class="col-sm-10">
                <input type="text" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
                {% if error_telephone %}
                <div class="text-danger">{{ error_telephone }}</div>
                {% endif %} </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-order-id">{{ entry_order_id }}</label>
              <div class="col-sm-10">
                <input type="text" name="order_id" value="{{ order_id }}" placeholder="{{ entry_order_id }}" id="input-order-id" class="form-control" />
                {% if error_order_id %}
                <div class="text-danger">{{ error_order_id }}</div>
                {% endif %} </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="input-date-ordered">{{ entry_date_ordered }}</label>
              <div class="col-sm-3">
                <div class="input-group date">
                  <input type="text" name="date_ordered" value="{{ date_ordered }}" placeholder="{{ entry_date_ordered }}" data-date-format="YYYY-MM-DD" id="input-date-ordered" class="form-control" />
                  <span class="input-group-btn">
                  <button type="button" class="btn btn-default"><i class="icon-calendar"></i></button>
                  </span></div>
              </div>
            </div>
          </fieldset>
          <fieldset>
            <legend>{{ text_product }}</legend>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-product">{{ entry_product }}</label>
              <div class="col-sm-10">
                <input type="text" name="product" value="{{ product }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
                {% if error_product %}
                <div class="text-danger">{{ error_product }}</div>
                {% endif %} </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-model">{{ entry_model }}</label>
              <div class="col-sm-10">
                <input type="text" name="model" value="{{ model }}" placeholder="{{ entry_model }}" id="input-model" class="form-control" />
                {% if error_model %}
                <div class="text-danger">{{ error_model }}</div>
                {% endif %} </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="input-quantity">{{ entry_quantity }}</label>
              <div class="col-sm-10">
                <input type="text" name="quantity" value="{{ quantity }}" placeholder="{{ entry_quantity }}" id="input-quantity" class="form-control" />
              </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label">{{ entry_reason }}</label>
              <div class="col-sm-10"> {% for return_reason in return_reasons %}
                {% if return_reason.return_reason_id == return_reason_id %}
                <div class="radio">
                  <label>
                    <input type="radio" name="return_reason_id" value="{{ return_reason.return_reason_id }}" checked="checked" />
                    {{ return_reason.name }}</label>
                </div>
                {% else %}
                <div class="radio">
                  <label>
                    <input type="radio" name="return_reason_id" value="{{ return_reason.return_reason_id }}" />
                    {{ return_reason.name }}</label>
                </div>
                {% endif %}
                {% endfor %}
                {% if error_reason %}
                <div class="text-danger">{{ error_reason }}</div>
                {% endif %} </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label">{{ entry_opened }}</label>
              <div class="col-sm-10">
                <label class="radio-inline"> {% if opened %}
                  <input type="radio" name="opened" value="1" checked="checked" />
                  {% else %}
                  <input type="radio" name="opened" value="1" />
                  {% endif %}
                  {{ text_yes }}</label>
                <label class="radio-inline"> {% if not opened %}
                  <input type="radio" name="opened" value="0" checked="checked" />
                  {% else %}
                  <input type="radio" name="opened" value="0" />
                  {% endif %}
                  {{ text_no }}</label>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="input-comment">{{ entry_fault_detail }}</label>
              <div class="col-sm-10">
                <textarea name="comment" rows="10" placeholder="{{ entry_fault_detail }}" id="input-comment" class="form-control">{{ comment }}</textarea>
              </div>
            </div>
            {{ captcha }}
          </fieldset>
          {% if text_agree %}
          <div class="buttons clearfix">
            <div class="pull-left"><a href="{{ back }}" class="btn btn-danger">{{ button_back }}</a></div>
            <div class="pull-right">{{ text_agree }}
              {% if agree %}
              <input type="checkbox" name="agree" value="1" checked="checked" />
              {% else %}
              <input type="checkbox" name="agree" value="1" />
              {% endif %}
              <input type="submit" value="{{ button_submit }}" class="btn btn-primary" />
            </div>
          </div>
          {% else %}
          <div class="buttons clearfix">
            <div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
            <div class="pull-right">
              <input type="submit" value="{{ button_submit }}" class="btn btn-primary" />
            </div>
          </div>
          {% endif %}
        </form>
        {{ content_bottom }}
      </div>
      {{ column_right }}
    </div>
  </div>
</div>
<script type="text/javascript"><!--
$('.date').datetimepicker({
	language: '{{ datepicker }}',
	pickTime: false
});
//--></script> 
{{ footer }} 